<div class="panel panel-default" ng-controller="SaleShiftCtrl">
	<div class="panel-heading">
		 促销活动 / 查看折扣班次 （{{subject}}） <span
			style="float: right; margin-top: -7px; height: 0px">
			<button type="submit" class="btn m-b-xs w-xs btn-info"
				ui-sref="app.public.sales()">返回</button>
		</span>
	</div>
	<toaster-container
		toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
	<div class="row wrapper m-n">
		<form class="bs-example form-horizontal ng-pristine ng-valid">
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<div class="input-group">
						<ui-select ng-model="starList.selected" theme="bootstrap">
						<ui-select-match placeholder="始发客运站">{{$select.selected.name}}</ui-select-match>
						<ui-select-choices
							repeat="star in starList | propsFilter: {name: $select.search}">
						<span ng-bind-html=" star.name| highlight: $select.search"></span>
						</ui-select-choices> </ui-select>
						<span class="input-group-btn">
							<button ng-click="starList.selected = undefined"
								class="btn btn-default">
								<span class="glyphicon glyphicon-trash"></span>
							</button>
						</span>
					</div>
				</div>
			</div>
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<input type="text" ng-model="queryMap.terminal" class="form-control"
						placeholder="终点站名称">
				</div>
			</div>
			<div class="form-group col-md-3" ng-controller="DatepickerDemoCtrl">
				<div class="col-md-11">
					<div class="input-group">
						<input type="text" class="form-control"
							datepicker-popup="{{format}}" is-open="opened"
							ng-model="timeDeparture.startTime"
							datepicker-options="dateOptions" close-text="Close"
							placeholder="发车日期" readOnly /> <span class="input-group-btn">
							<button type="button" class="btn btn-default"
								ng-click="open($event)">
								<i class="glyphicon glyphicon-calendar"></i>
							</button>
						</span>
					</div>
				</div>
			</div>
			<div class="form-group col-md-1">
				<div class="col-md-1">
					<button type="button" class="btn btn-info" ng-click="query()">查询</button>
				</div>
			</div>
		</form>
	</div>
	<div class="table-responsive">
		<table class="table table-striped b b-light">
			<thead>
				<tr>
					<th style="width: 10px;"></th>
					<th style="width: 50px;">班次号</th>
					<th style="width: 100px;">起点站</th>
					<th style="width: 70px;">终点站</th>
					<th style="width: 50px;">发车日期</th>
					<th style="width: 50px;">
						<div class="list-icon">
							<a href tooltip="关联班次" >
								<i class="fa fa-plus" ng-click="add()"></i>
							</a>
						</div>
					</th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="shift in dataList">
					<td></td>
					<td>{{shift.shiftNo}}</td>
					<td>{{shift.stationStart.name}}</td>
					<td>{{shift.terminal}}</td>
					<td>{{shift.departureDate| date : 'yyyy-MM-dd'}}</td>
					<td>
					    <div class="list-icon">
							<a href tooltip="删除">
								<i class="fa fa-times" ng-click="del('sm',shift ,'delete')"></i>
							</a>												        
					    </div>					
					</td>
				</tr>
				<tr ng-show="dataList==''">
					<td colspan="9" style="text-align: center;">暂无促销班次信息</td>
				</tr>
			</tbody>
		</table>
	</div>
	<page-footer />
</div>
